package com.arsn.myf.system.service.impl;

import com.arsn.myf.system.entity.Post;
import com.arsn.myf.system.mapper.PostMapper;
import com.arsn.myf.system.service.PostService;
import com.arsn.myf.system.vo.PostVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 岗位实现层
 * @author zhongrj
 */
@Service
public class PostServiceImpl extends ServiceImpl<PostMapper, Post> implements PostService {

    /**
     * 自定义查询岗位分页数据
     * @param page
     * @param post
     * @return
     */
    @Override
    public IPage<PostVO> selectPagePostList(Page<PostVO> page, PostVO post) {
        return page.setRecords(baseMapper.selectPagePostList(page,post));
    }

    /**
     * 查询 岗位列表（不分页）
     * @param post 岗位对象参数
     * @return
     */
    @Override
    public List<PostVO> getPostList(PostVO post) {
        return baseMapper.getPostList(post);
    }
}
